<?php

// +----------------------------------------------------------------------
// | Copyright (c) 2020 All rights reserved.
// +----------------------------------------------------------------------
// | User: Simony <1362229026@qq.com>
// | wechat: Shen86579595
// +----------------------------------------------------------------------
namespace app\admin\controller;

use app\admin\controller\Common;
use think\Db;

class Release extends Common
{
    /**
     * User:Simony
     * Function: 发布内容付费记录列表
     * @return mixed
     */
    public function contentPayLogList()
    {
        //params
        $field = input('get.field', '');
        $value = input('get.value', '');
        $search_field = input('get.search_field', '');
        $search_value = input('get.search_value', '');

        //where
        $where = [];

        //judge
        if ($field) $where[$field] = $value;
        if ($search_field) $where[$search_field] = $search_value;

        //model
        $releaseContentPayLogModel = model('common/release/ReleaseContentPayLog');
        $field = 'r_c_p_l.*,m1.username,c_t.name as type_name';

        //getData
        $list = $releaseContentPayLogModel->getReleaseContentPayLogList($where, 10, $field);

        //assign
        $this->assign('list', $list);
        $this->assign('pay_types', $releaseContentPayLogModel->pay_types);
        $this->assign('page', $releaseContentPayLogModel->page_info->render());
        return $this->fetch();
    }


}